package com.pks.datacenter.utils;

import java.util.Random;

/**
 * 
 * @author pks
 * @version 2019年9月26日 
 */
public class SUtilGeoPwd {
	
	public static final String ptzf[] = new String[]{"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","s","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","1","2","3","4","5","6","7","8","9","0"};
	public static final String tszf[] = new String[]{"@","_"};
	public static final Random random = new Random();
	
	public static String geoApiUserPwd(){
		StringBuffer sb = new StringBuffer();
		int len = random.nextInt(5);
		int r ;
		boolean bool = false;
		for (int i = 0; i < 15+len; i++) {
			r = random.nextInt(20);
			if (r >= 18 && bool == false) {
				sb.append(tszf[random.nextInt(tszf.length)]);
				bool = true;
			}else{
				sb.append(ptzf[random.nextInt(ptzf.length)]);
			}
		}
		return sb.toString();
	}
	
	public static void main(String[] args) {
		System.out.println(geoApiUserPwd());
	}
}
